<!--
 * @Author: wangshuixin 2412658453@qq.com
 * @Date: 2024-10-29 10:14:11
 * @LastEditors: wangshuixin 2412658453@qq.com
 * @LastEditTime: 2024-10-29 15:34:31
 * @FilePath: \web-components-box\components\Formula\index.vue
 * @Description: 公式
-->
<script setup lang="ts">
import FormulaItem from './components/FormulaItem.vue'
import { type ExpressionTerm } from '~/types/equation'

const props = defineProps({
  data: { // 公式显示数据
    type: Object as () => ExpressionTerm[],
    required: true,
  },
})

</script>

<template>
  <div class="formula-row">
    <div v-for="(formulaItem, index) in props.data" :key="index">
      <FormulaItem :data="formulaItem" />
    </div>
  </div>
</template>

<style scoped lang="less">
.formula-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 1rem;
  font-family: PingFangSC;
  line-height: 40px;
}
</style>